<h3><a href="#">Caractéristiques de votre véhicule</a></h3>
	<div class="b1">
        <div class="cat_vehicule">
            <span style="font-size:0.8em;float:left;margin-top:-20px;margin-left:20px;">Tous les champs marqués avec un astérisque sont obligatoires</span>
       		<div class="cat1">
            	<div class="rows"><label>Catégorie<span style="color:red;margin-left:5px;">*</span></label>
                    <select id="ess_iCatId" name="ess_iCatId" class="required">
                         <option value="0"></option>
                        {foreach $categories as $oCatVoiture}
                        <option value="{$oCatVoiture->catV_id}"
                            {if (isset($voiture) && ($oCatVoiture->catV_id == $voiture->Occas_Groupe))} selected {/if}
                            >{$oCatVoiture->catV_zLibelle|escxml}</option>
                        {/foreach}
                    </select>
                </div>
                <div class="rows"><label>Marque<span style="color:red;margin-left:5px;">*</span></label>
                    <select id="ess_iMarqueId" name="ess_iMarqueId" class="required">
                        <option value="0"></option>
                        {foreach $marque as $oMarqueVoiture}
                        <option value="{$oMarqueVoiture->marque_id}"
                        {if (isset($voiture) && ($oMarqueVoiture->marque_id == $voiture->Occas_Marque))} selected {/if}
                        >{$oMarqueVoiture->marque_libelle|escxml}</option>
                        {/foreach}
                    </select>
                </div>
                <div class="rows"><label>Modèle<span style="color:red;margin-left:5px;">*</span></label>
                    <select id="ess_iModelId" name="ess_iModelId" class="required">
                        <option value="0"></option>
                        {foreach $modeles as $item}
                        <option value="{$item->modele_id}" {if ( isset($voiture) && ($item->modele_id == $voiture->Occas_Modele))} selected {/if}>{$item->modele_libelle}</option>
                        {/foreach}
                    </select>
                </div>
                <div class="rows"><label>Version<span style="color:red;margin-left:5px;">*</span></label>
                    <input type="text" value="{if (isset($voiture))} {$voiture->Occas_Version} {/if}" name="ess_zVersion" id="version" class="required"/>

                </div>
                <div class="rows"><label>Energie<span style="color:red;margin-left:5px;">*</span></label>
                    <select id="voiture_energie" name="voiture_energie" class="required">
                        <option value="0"></option>
                        {foreach $carburation as $itemCarburation}
                        <option value="{$itemCarburation->id}" {if (isset($voiture) && ($itemCarburation->id == ($voiture->Occas_Carburation)))} selected {/if}>{$itemCarburation->name}</option>
                        {/foreach}
                    </select>
                </div>
                <div class="rows"><label>Kilométrage<span style="color:red;margin-left:5px;">*</span></label><input type="text" name="km" id="km_moteur" value="{if (isset($voiture))}{$voiture->Occas_Kilometrage}{/if}" class="required" /></div>
                <div class="rows" style="height:40px;"><label>Km moteur si changé</label><input type="text" id="km_moteur1" name="km-moteur" value="{if (isset($voiture))}{$voiture->Occas_Kilom_Moteur}{/if}"/></div>

                <div class="rows">
                    <label>Prix<span style="color:red;margin-left:5px;">*</span></label>
                    <input type="text" style="width:120px!important" name="voiture_prix" value="{if (isset($voiture->Occas_Prix))}{$voiture->Occas_Prix}{/if}" class="required" />
                    <input type="checkbox" style="margin-top:4px!important;margin-left:20px!important" value="1" name="voiture_debattre" {if (isset($voiture) && (1 == ($voiture->Occas_Adebattre)))} checked {/if}/> à débattre
                </div>
                       

                <div class="rows">
                    <label>Couleur<span style="color:red;margin-left:5px;">*</span></label>
                    <input type="text" style="width:120px!important" name="couleur" id="couleur" value="{if (isset($voiture))}{$voiture->Occas_Couleur}{/if}" class="required" />
                    <input type="checkbox" style="margin-top:4px!important;margin-left:20px!important" name="metal" value="1" {if (isset($voiture) && (($voiture->Occas_Coul_Metal) == 1) )} checked {/if}/><span>metal</span>
                </div>
            </div>
            <div class="cat2">
                <div class="rows"><label>Nbre de Portes<span style="color:red;margin-left:5px;">*</span></label>
                    <select id="nb-porte" name="nb-porte" class="required">
                        <option value="0"></option>
                        <option value="2" {if (isset($voiture) && (($voiture->Occas_NbPorte) == 2) )} selected {/if}>2</option>
                        <option value="3" {if (isset($voiture) && (($voiture->Occas_NbPorte) == 3) )} selected {/if}>3</option>
                        <option value="4" {if (isset($voiture) && (($voiture->Occas_NbPorte) == 4) )} selected {/if}>4</option>
                        <option value="5" {if (isset($voiture) && (($voiture->Occas_NbPorte) == 5) )} selected {/if}>5</option>
                    </select>
                </div>
                <div class="rows"><label>Boite<span style="color:red;margin-left:5px;">*</span></label>
                    <select id="boite" name="boite" class="required">
                        <option value="0"></option>
                        {foreach $vitesse as $itemVitesse}
                        <option value="{$itemVitesse->id}" {if (isset($voiture) && (($voiture->Occas_Bt_Vitesse) == ($itemVitesse->id)) )} selected {/if}>{$itemVitesse->name}</option>
                        {/foreach}
                    </select>
                </div>
                <div class="rows"><input type="checkbox" value="1" name="main" {if (isset($voiture) && (($voiture->Occas_Premieremain) == 1) )} checked {/if}/><span>1ere main</span></div>

                <div class="rows"><label>Mise en circulation<span style="color:red;margin-left:5px;">*</span></label>
                    <select id="circulation_1" name="circulation_1" class="s1 required">
                        <option value="0"></option>
                        <option value="01">01</option>
                        <option value="02">02</option>
                        <option value="03">03</option>
                        <option value="04">04</option>
                        <option value="05">05</option>
                        <option value="06">06</option>
                        <option value="07">07</option>
                        <option value="08">08</option>
                        <option value="09">09</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                    </select>
                    <select id="circulation_2" name="circulation_2" class='s2 required'>
                        <option value="0"></option>
                        {for $i = 0;$i < 60; $i++}
                            <option value="{$dateCirculation - $i}">{$dateCirculation - $i}</option>
                        {/for}
                    </select>
                </div>
                <input type="hidden" id="dmc" value="{if (isset($voiture))}{$voiture->Occas_MiseCirculation}{/if}" />
                {literal}
                <script type="text/javascript">
                    var date = $('#dmc').val();
                    dates = date.split("-");
                    $("#circulation_1 option").each(function(){
                        if( $(this).attr("value") == dates[1]) $(this).attr("selected","selected") ;
                    });
                    $("#circulation_2 option").each(function(){
                        if( $(this).attr("value") == dates[0]) $(this).attr("selected","selected") ;
                    });
                </script>
                {/literal}
                <div class="rows"><label>Garantie</label>
                    <select id="garantie_1" name="garantie_1" class="s1">
                        <option value="0"></option>
                        <option value="01">01</option>
                        <option value="02">02</option>
                        <option value="03">03</option>
                        <option value="04">04</option>
                        <option value="05">05</option>
                        <option value="06">06</option>
                        <option value="07">07</option>
                        <option value="08">08</option>
                        <option value="09">09</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                    </select>
                    <select id="garantie_2" name="garantie_2" class="s2">
                        <option value="0"></option>
                        {assign $j=0}
                        {while $j < 16}
                            <option value="{$dateCirculation + $j}">{$dateCirculation + $j}</option>
                            {assign $j++}
                        {/while}
                    </select>
                </div>
                <div class="rows"><label>Milesime<span style="color:red;margin-left:5px;">*</span></label>
                    <select id="millesime" name="millesime" class="required">
                        <option value="0"></option>
                        {for $i=0; $i < 3; $i++}
                            <option value="{$dateCirculation - $i}"
                            {if (isset($voiture) && (($voiture->Occas_Millesime) == ($dateCirculation - $i)) )} selected {/if}
                            >{$dateCirculation - $i}</option>
                        {/for}
                    </select>
                    {if isset($voiture->Occas_Millesime) && $voiture->Occas_Millesime}
                    <input type="hidden" name="_mill" id="_mill" value="{$voiture->Occas_Millesime}" />
                    {else}
                    <input type="hidden" name="_mill" id="_mill" value="0" />
                    {/if}
                </div>
                {literal}
                    <script type="text/javascript">
                        $(function(){
                      		_index = parseInt($('#circulation_2').val());
                            if (_index)
                            {                                
                                $("#millesime").html("");

                                _html  = "<option value=''></option>";
                                _html += "<option value="+(_index - 1)+">"+(_index - 1)+"</option>";
                                _html += "<option value="+_index+">"+_index+"</option>";
                                _html += "<option value="+(_index +1)+">"+(_index +1)+"</option>";
                                $("#millesime").html(_html);
                                millesime_ = $('#_mill').val();
                                $("#millesime option").each(function(){
                                    if( $(this).attr("value") == millesime_) $(this).attr("selected","selected") ;
                                });

                            }
                        });
                    </script>
                {/literal}
                <div class="rows"><label>Puis.fiscale<span style="color:red;margin-left:5px;">*</span></label>
                    <input type="text" value="{if (isset($voiture))}{$voiture->Occas_ChevFisc}{/if}" name="puiss-fiscal" class="required"/>
                </div>
                
                <input type="hidden" id="gar" value="{if (isset($voiture))}{$voiture->Occas_Garantie}{/if}" />
                {literal}
                <script type="text/javascript">
                    var date = $('#gar').val();
                    dates = date.split("-");
                    $("#garantie_1 option").each(function(){
                        if( $(this).attr("value") == dates[1]) $(this).attr("selected","selected") ;
                    });
                    $("#garantie_2 option").each(function(){
                        if( $(this).attr("value") == dates[0]) $(this).attr("selected","selected") ;
                    });
                </script>
                {/literal}
                {literal}
                <style type="text/css">
                   .required_selectbox{
                        border: 2px solid red;
                   }
                </style>
                {/literal}
                <div class="rows"><label>Contrôle technique<span style="color:red;margin-left:5px;">*</span></label>
                    <select id="ctrl-tech" name="ctrl-tech" class="required">
                        <option value="0"></option>
                       <option value="3" {if (isset($voiture) && (($voiture->Occas_CT) == 3) )} selected {/if}>OK</option>
                        <option value="1" {if (isset($voiture) && (($voiture->Occas_CT) == 1) )} selected {/if}>Recalé</option>
                        <option value="2" {if (isset($voiture) && (($voiture->Occas_CT) == 2) )} selected {/if}>Vierge</option>
                        <option value="4" {if (isset($voiture) && (($voiture->Occas_CT) == 4) )} selected {/if}>Non nécessaire</option>
                        <option value="5" {if (isset($voiture) && (($voiture->Occas_CT) == 5) )} selected {/if}>Non effectué</option>
                    </select>
                </div>

            </div>
            <div class="rows_bt" style="margin:0px;"><a href="#" id="check-vehicule"><img alt="Valider" src="{$j_basepath}design/front/images/btn_valider.png" title="Valider" /><br /></a></div>
            <div class="clear">&nbsp;</div>
      </div>
	</div>
            